package com.ktjy.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * 代码生成字段信息表实体类
 *
 * @author LILIBO
 * @since 2025-06-18
 */
@Tag(name = "代码生成字段信息表", description = "代码生成字段信息表数据")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("`gen_table_column`")
public class GenTableColumn implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 生成表字段编号ID
     */
    @Schema(description = "生成表字段编号ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 归属表编号ID
     */
    @Schema(description = "归属表编号ID")
    private Long tableId;

    /**
     * 列名称
     */
    @Schema(description = "列名称")
    private String columnName;

    /**
     * 列描述
     */
    @Schema(description = "列描述")
    private String columnComment;

    /**
     * 列类型
     */
    @Schema(description = "列类型")
    private String columnType;

    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer columnSort;

    /**
     * JAVA类型
     */
    @Schema(description = "JAVA类型")
    private String javaType;

    /**
     * JAVA字段名
     */
    @Schema(description = "JAVA字段名")
    private String javaField;

    /**
     * 是否主键 0-否;1-是
     */
    @Schema(description = "是否主键 0-否;1-是")
    private Integer isPk;

    /**
     * 是否自增 0-否;1-是
     */
    @Schema(description = "是否自增 0-否;1-是")
    private Integer isIncrement;

    /**
     * 是否必填 0-否;1-是
     */
    @Schema(description = "是否必填 0-否;1-是")
    private Integer isRequired;

    /**
     * 是否为插入字段 0-否;1-是
     */
    @Schema(description = "是否为插入字段 0-否;1-是")
    private Integer isInsert;

    /**
     * 是否编辑字段 0-否;1-是
     */
    @Schema(description = "是否编辑字段 0-否;1-是")
    private Integer isEdit;

    /**
     * 是否列表字段 0-否;1-是
     */
    @Schema(description = "是否列表字段 0-否;1-是")
    private Integer isList;

    /**
     * 是否查询字段 0-否;1-是
     */
    @Schema(description = "是否查询字段 0-否;1-是")
    private Integer isQuery;

    /**
     * 查询方式（等于、不等于、大于、小于、范围）
     */
    @Schema(description = "查询方式（等于、不等于、大于、小于、范围）")
    private String queryType;

    /**
     * 显示类型（文本框、文本域、下拉框、复选框、单选框、日期控件）
     */
    @Schema(description = "显示类型（文本框、文本域、下拉框、复选框、单选框、日期控件）")
    private String htmlType;

    /**
     * 字典类型
     */
    @Schema(description = "字典类型")
    private String dictType;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 状态 0-正常;1-禁用
     */
    @Schema(description = "状态 0-正常;1-禁用")
    private Integer status;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private String modifyTime;

    /**
     * 删除标记 0-正常;1-删除
     */
    @Schema(description = "删除标记 0-正常;1-删除")
    private Integer deleteFlag;

    /**
     * 带参构造方法
     */
    public GenTableColumn(Long tableId, String columnName, String columnComment, String columnType, Integer columnSort, String javaType, String javaField, Integer isPk, Integer isIncrement, Integer isRequired, Integer isInsert, Integer isEdit, Integer isList, Integer isQuery, String queryType, String htmlType, String dictType, String remark, Integer status, String createTime, String modifyTime, Integer deleteFlag) {
        this.tableId = tableId;
        this.columnName = columnName;
        this.columnComment = columnComment;
        this.columnType = columnType;
        this.columnSort = columnSort;
        this.javaType = javaType;
        this.javaField = javaField;
        this.isPk = isPk;
        this.isIncrement = isIncrement;
        this.isRequired = isRequired;
        this.isInsert = isInsert;
        this.isEdit = isEdit;
        this.isList = isList;
        this.isQuery = isQuery;
        this.queryType = queryType;
        this.htmlType = htmlType;
        this.dictType = dictType;
        this.remark = remark;
        this.status = status;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.deleteFlag = deleteFlag;
    }

}
